package cn.lzy.ioc;

import cn.lzy.ioc.entity.User;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Description 属性注入——构造器注入
 * @Author lzy
 * @Date 2023/9/9 15:05
 * @Version
 **/
public class TestDemo05ConstructorInject {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("beans_constructor_inject.xml");
        User user01 = ctx.getBean("user01", User.class);
        System.out.println("user01 = " + user01);
    }
}
